package com.ot.flink.cdc.util;

import org.apache.commons.compress.utils.Lists;
import org.apache.commons.lang3.StringUtils;

import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * @Description: string 工具类
 * @author: admin
 * @date: 2024/4/19
 */
public class CdcStringUtil {

    public static List<String> stringToList(final String str) {
        if (StringUtils.isEmpty(str)) {
            return Lists.newArrayList();
        }
        List<String> list = Stream.of(StringUtils.split(str, ",")).collect(Collectors.toList());
        return list;
    }

}
